package calbs.socket; /**
 * Created by zhangqin on 2017/8/7.
 */

import calbs.socket.server.NettyServerBootstrap;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.jms.annotation.EnableJms;
import org.springframework.transaction.annotation.EnableTransactionManagement;

/**
 * @author 张钦
 * @create 2017-08-07 10:40
 **/

@EnableCaching
@SpringBootApplication
@EnableJms
@EnableTransactionManagement
@ComponentScan(basePackages={"calbs.socket.spring","calbs.socket.service","calbs.socket.dao","calbs.socket","calbs.socket.jms"})
public class Application implements CommandLineRunner {
    Logger logger = LoggerFactory.getLogger(Application.class);
    public static void main(String[] args) {
        ConfigurableApplicationContext content = SpringApplication.run(Application.class, args);
    }

    @Override
    public void run(String... strings) throws Exception {
        logger.info(">>>>>>>>>>>>>>>start socket service<<<<<<<<<<<<<");
        new NettyServerBootstrap(10088);
    }
}
